import request from "@/utils/request"

export const quyuList = (pageIndex) => request.get('/api/vm-service/region/search', {
  params: {
   pageIndex,
   pageSize:10
  }
})
//新增区域
export const addArea = data => request.post('/api/vm-service/region', data)

//删除区域
export const delArea = (id) => request.delete(`/api/vm-service/region/${id}`)
//修改区域
export const edmitArea = (id, data) => request.put(`/api/vm-service/region/${id}`, data)
//获取区域详情
export const AreaDetail = (regionId,pageIndex) => request.get('/api/vm-service/node/search', {
  params: {
    pageIndex:1,
    pageSize: 10,
    regionId
  }
})
//搜索区域
export const AreaSearch = (name,pageIndex) => request.get('/api/vm-service/region/search', {
  params: {
    name,
    pageSize: 10,
    pageIndex
  }
})
//点位搜索
export const PointSearch = (pageIndex) => request.get('/api/vm-service/node/search', {
  params: {
    pageSize: 10,
    pageIndex,
   
  }
})
//删除点位
export const deldianwei = (id) => request.delete(`/api/vm-service/node/${id}`)
//获取商圈
export const bussiness = type => request.get('/api/vm-service/businessType')
//新增点位
export const addPoint = data => request.post('/api/vm-service/node', data)
//点位管理
export const guanliPoint = (pageIndex,pageSize) => request.get('/api/vm-service/region/search', {
  params: {
    pageIndex,
    pageSize
  }
})
//点位查询
export const PointSearch1 = (pageIndex,regionId,name) => request.get('/api/vm-service/node/search', {
  params: {
    pageSize: 10,
    pageIndex,
    regionId,
    name
   
  }
})
//查看点位详情
export const PointXiangqing = id => request.get(`/api/vm-service/node/vmList/${id}`)
//修改点位
export const PointEdmit = (id, data) => request.put(`/api/vm-service/node/${id}`, data)
//获取合作商详情
export const hezuo = (pageIndex) => request.get('/api/user-service/partner/search', {
  params: {
    pageSize: 10,
    pageIndex
  }
})
//删除合作商
export const delhezuo = id => request.delete(`/api/user-service/partner/${id}`)
//合作商搜索
export const searchHezuo = (name, pageIndex) => request.get('/api/user-service/partner/search', {
  params: {
    pageIndex,
    name,
    pageSize:10
  }
})

//新增合作商
export const addHezuo = data => request.post('/api/user-service/partner', data)
//修改合作商
export const edmitHezuo = (id, data) => request.put(`/api/user-service/partner/${id}`, data)

//重置合作商密码
export const resetPassword = id => request.put(`/api/user-service/partner/resetPwd/${id}`)